Channel ownership in a publish-subscribe system

ABSTRACT

To manage channel ownership in a publish-subscribe data processing environment, a determination is made at a first server that a subscription request from a client relates to a channel, the channel having a channel identifier. At an exchange component in a messaging middleware, a session queue associated with the client is bound to the channel. A mandatory delivery message is configured to be routed using a publisher identifier by the exchange component, the publisher identifier being related to the channel identifier. The mandatory delivery message is communicated from the first server to the exchange component to indicate an intent of the first server to become a publisher of the channel. The mandatory delivery message causes the channel ownership of the channel to be limited to a single publisher.

TECHNICAL FIELD

The present invention relates generally to a method, system, andcomputer program product for managing data requests and responses. Moreparticularly, the present invention relates to a method, system, andcomputer program product for channel ownership in a publish-subscribesystem.

BACKGROUND

Most data communications between two data processing systems involve arequest for data and a response containing the requested data. Forexample, a client data processing system requests data by sending arequest message using HyperText Transfer Protocol (http or HTTP) to aserver data processing system. The server, using HTTP, sends a responsemessage containing the data to the client.

A client can request data updates on an ongoing basis. For example, in aclient-server environment using live query type of requests, a clientessentially subscribes to an ongoing feed of data updates from aserver-side, or backend, data processing environment. Live query, alsoknown as dynamic query or continuous query, is a method by which aclient requests ongoing updates on an event or state of something.

A simple example of live query is a request from a browser to live stockprice of a stock ticker, where in response to such a query, a serversupplies the browser ongoing updates of the changing stock price of thatticker. To provide ongoing updates in response to a request, a servertypically monitors the changes in a database or the changes in the stateof an event. The server may monitor these changes by polling thedatabase or periodically observing the event for any changes fromprevious data in the database or from the previous state of the event.

HTTP protocol only supports a request-response model where clientsinitiate the requests and the servers respond to the client requests. Inthe standard HTTP model, a server cannot push responses back to a clientwithout a corresponding request pending from the client. In a live querytype publish-subscribe system, servers directly push the content back toclients. This type of operation can be achieved through a protocol, suchas websockets, that supports bi-directional communication between clientand server.

In a client-server model where clients subscribe to such dynamic contentfeed generated by the servers, multiple servers can be used for loadbalancing. One form of load balancing to support horizontal scaling isto use independent servers where the servers are not aware of what otherservers are doing for the same or different clients. In a server-sidedata processing environment, where multiple independent servers with noshared state information about each other operate together to servenumerous requests from numerous clients, an incoming request from aclient for subscribing or unsubscribing from receiving such data updatescan be routed to any server for processing.

SUMMARY

The illustrative embodiments provide a method, system, and computerprogram product for channel ownership in a publish-subscribe system. Anembodiment includes a method for managing channel ownership in apublish-subscribe data processing environment. The embodimentdetermines, at a first server, using a processor and a memory, that asubscription request from a client relates to a channel, the channelhaving a channel identifier. The embodiment causes at an exchangecomponent in a messaging middleware, a session queue associated with theclient to bind to the channel. The embodiment configures a mandatorydelivery message to be routed using a publisher identifier by theexchange component, the publisher identifier being related to thechannel identifier. The embodiment communicates, from the first serverto the exchange component, the mandatory delivery message to indicate anintent of the first server to become a publisher of the channel, whereinthe mandatory delivery message causes the channel ownership of thechannel to be limited to a single publisher.

Another embodiment includes a computer usable program product comprisinga computer readable storage device including computer usable code formanaging channel ownership in a publish-subscribe data processingenvironment.

Another embodiment includes a data processing system for managingchannel ownership in a publish-subscribe data processing environment.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The novel features believed characteristic of the invention are setforth in the appended claims. The invention itself, however, as well asa preferred mode of use, further objectives and advantages thereof, willbest be understood by reference to the following detailed description ofthe illustrative embodiments when read in conjunction with theaccompanying drawings, wherein:

FIG. 1 depicts a block diagram of a network of data processing systemsin which illustrative embodiments may be implemented;

FIG. 2 depicts a block diagram of a data processing system in whichillustrative embodiments may be implemented;

FIG. 3 depicts a block diagram of an example configuration for ongoingpublishing of content in a publish-subscribe client-server environmentin accordance with an illustrative embodiment;

FIG. 4 depicts a block diagram of a condition in channel ownership in apublish-subscribe system in accordance with an illustrative embodiment;

FIG. 5 depicts a block diagram of a configuration to resolve a channelownership problem in a publish-subscribe system in accordance with anillustrative embodiment;

FIG. 6 depicts a flowchart of an example process for channel ownershipin a publish-subscribe system in accordance with an illustrativeembodiment;

FIG. 7 depicts a flowchart of an example process to resolve simultaneousor near simultaneous multiple publisher race condition in accordancewith an illustrative embodiment; and

FIG. 8 depicts a flowchart of an example process to eliminate duplicatepublisher in accordance with an illustrative embodiment.

DETAILED DESCRIPTION

The illustrative embodiments recognize that in a client-serverenvironment where clients subscribe to data feeds, multiple servers canend up performing duplicative work that is wasteful of the resources.For example, in such environments, it is likely that multiple serverscould be processing for the same data or events to publish the same dataupdates or feeds in response to similar requests from different clients.

The illustrative embodiments further recognize that the duplicative workon the server-side is also confusing on the client-side. For example, insome cases, it is also possible that the same client sends a request anda re-request for the same query, and different servers end up processingthe request and the re-request. Thus, more than one servers can startpublishing duplicate data feeds, which can confuse or disrupt anoperation on the client-side.

The illustrative embodiments used to describe the invention generallyaddress and solve the above-described problems and other problemsrelated to managing data requests and responses. The illustrativeembodiments provide a method, system, and computer program product forscalable and self-healing architecture for channel ownership in apublish-subscribe system.

The embodiments described herein are adaptable to other types orrequests and responses using HTTP or other protocols. The embodimentsdescribed herein are also adaptable for use not only with mobile devicesbut also with other data processing system and environments where thepublish-subscribe model for client-server communications can be used.

In some embodiments, a requestor system is described as a client and aresponding system is described as a server without implying anyparticular client-server configuration or architecture. A client issimply a consumer of data and a server is simply a supplier of data, anda system that is a client in one exchange could very well be the server(or backend) in another exchange, and vice versa. Typically, serversoperate in a backend data processing environment and are accessed over adata network from applications executing at client systems. The backenddata processing environment—also referred to herein as the server-sidedata processing environment—comprises applications and systems toreceive the data requests, repositories of data from which to providedata in response, applications whose services are requested in somerequests, security applications, middleware applications and platforms,and many other systems and applications.

An embodiment can be implemented as an application in software,hardware, or firmware, to operate in the backend data processingenvironment. Some operations of some embodiments described herein can beimplemented in a server, such as by modifying a server application toperform those operations. Generally, within the scope of theillustrative embodiments, the operations and functions of an embodimentcan be implemented in a stand-alone manner or in conjunction with otherapplications executing in the backend data processing environment. Forexample, an application implementing an embodiment can be configured tooperate as a modification of a server, a modification of a messagingmiddleware, a stand-alone application usable by a server, a stand-aloneapplication usable by a messaging middleware, or some combinationthereof.

In operation, typically, several servers in a load-sharing configurationprovide the same type of service to numerous clients. According to anembodiment, each load-sharing server operating in such apublish-subscribe client-server architecture is capable of establishinga channel, publishing content—including ongoing updates—to that channel,and binding clients to listen to the content published on the channel.

The server establishes the channel based on the query or type of request(hereinafter referred to as “query”) from the client. Essentially,within the scope of the illustrative embodiments, a channel is simple amanner of establishing correspondence between a query and the publishedcontent. For example, assume that the query has an identifier. A serveruses the query identifier as a channel identifier. Publishing content tothe channel includes identifying the content with the identifier so thata client listening to the channel can establish the correspondencebetween the query and the content.

In one embodiment, the request message specifies the query identifierand the server uses the specified identifier of the specified query as achannel identifier. In another embodiment, the request message specifiesthe query and the server uses a suitable method to determine anidentifier of the specified query, such as by generating a hash value ofthe query or by looking up the query in a catalog. The server then usesthe determined query identifier as a channel identifier.

A server can then bind the requesting client to listen to updatespublished on the channel. A client that is bound to a channel receivesthe content that is published on that channel without having to poll orsend a request for the content. As will be described in this disclosure,a messaging middleware maintains a session queue for a client. Thebinding of the client to a channel comprises configuring a path in themiddleware such that content published with the channel identifier canbe placed in the client's session queue.

A client initiates a data communication session by sending a handshakemessage to a backend data processing environment. The backend dataprocessing environment implements one or more agent applications, one ofwhich establishes a session identifier for the session and responds tothe client's handshake message. For the remainder of the datacommunications between the client and the backend, the client isexpected to use the session identifier.

Using the session identifier, the client sends a request, such as arequest for data and ongoing updates, to the backend data processingenvironment. An agent determines from the message header the query inthe request. For example, one request may ask for a database servicewhere a database has to provide updates on some changing data inresponse. As another example, another request may ask for a news orstock feed service where a server application may have to access a datasource to obtain and supply the data and the updates. As anotherexample, a request may ask for a notification service where a backendapplication has to supply information of an event when changes in theevent are detected. Many other types of services can similarly be thesubject of the query in a request message.

A message-oriented middleware is any suitable application that enablestwo or more applications to communicate with each other via messagequeues (MQ). A variety of message-oriented middleware, also referred toherein as messaging middleware or MQ middleware, are presently availableand in use in backend data processing environments. MQ-Series andRabbitMQ are some examples of commercially available messagingmiddleware that facilitate such communications between applications(MQ-Series is a trademark of International Business Machines Corporationin the United States and other countries, RabbitMQ is an open sourcesoftware distributed by Pivotal Software, Inc., under Mozilla PublicLicense).

A messaging middleware allows one or more applications to publish one ormore messages for one or more other applications in a message queue. Theother applications subscribe to the queue. When a message is publishedto the queue, all subscribers, or a subset of the subscribers, to thequeue can receive the published message. The subset of subscribers thatreceive a message is determined by a combination of the policiesascribed to the queue and by the message contents themselves.

The set of one or more agent applications maintain a set of servicequeues. A service queue in the set of service queues is configured toreceive publications of requests having only a specific queries. Forexample, one service queue may be associated with monitoring aparticular data in a database, another service queue may be associatedwith a news feed service, and another service queue may be associatedwith monitoring an event.

Depending upon the service being requested in a request message query,an agent publishes the request to the service queue associated with thatservice. Those servers or backend applications, which provide therequested service, subscribe to the service queue for that service. Oneof the subscriber backend applications takes up the request from theservice queue. That subscriber backend application processes the requestand produces a response with the requested content.

An agent determines whether a session queue for the requestor client hasalready been created in the messaging middleware. A session queue isusable by a server to publish responses that have to be delivered to theclient. Whenever a server or backend application has data to send to theclient, the server or the backend application publishes that data to thesession queue for the client. The client is the ultimate subscriber tothe session queue with an agent acting as the intermediary who willforward the message. When data is published to the session queue, thesubscribing client receives the data via an agent.

In certain circumstances, a server can create a session queue andpublish the response to the queue for delivery to a client. To avoidcreating multiple session queues for the same session for the sameclient, before an agent creates a session queue, the agent checkswhether a session queue already exists for the client and the session.If a session queue already exists, the agent simply binds to theexisting session queue.

Thus, multiple agents can bind to the same session queue. When aresponse is posted to the session queue by a server or backendapplication, any one of the agents that are bound to the queue can sendthe published response to the subscribing client

When a subscribing client does not access a session queue for a queuetimeout period, an embodiment purges the queue and the remainingmessages therein. If a message is posted to a session queue, and asubscribing client does not pick up or receive the posted message, amessage timeout timer purges that posted message from the session queue.

Within the messaging middleware, each server also maintains a serverinstance queue. The server instance queues are used for communicationsbetween the servers. Such internal communications between servers do notmaintain any state information about each other.

In the architecture described above, an exchange is a messagingmiddleware function. An exchange comprises logic to route messages toqueues. A server publishes a message to the exchange in order to havethe message published to one or more queues.

For example, a server publishes content to a channel by publishing thecontent with the channel information to the exchange, and the exchangeroutes the content of the channel to those session queues that are boundto the exchange to consume messages for that channel. As anotherexample, a server indicates itself to be a publisher of a channel bypublishing a publisher message with the channel information to theexchange, and the exchange routing the publisher message related to thechannel to the server instance queues as described in this disclosure.As another example, a server attempts to make itself the sole publisheror the leader publisher of a channel by publishing a kill message withthe channel information to the exchange, and the exchange routing thekill message related to the channel to the server instance queues asdescribed in this disclosure.

With this architecture in place, an embodiment receives a subscriptionrequest from a client. The embodiment determines that the requestpertains to a particular channel, e.g., channel Z. If multiple clientsrequest the same query, multiple clients could be requestingsubscription to channel Z in this manner.

An agent queues the request in a suitable service queue according to thequery in the request. From a set of servers that process that query, aserver instance—e.g., server I0—picks up the request from the servicequeue. Server I0 binds the session queue of the requesting client withthe exchange for channel Z. In other words, when server I0 publishescontent on channel Z to the exchange, the exchange routes and stores thechannel Z content in the client's session queue. If more than one clientwere subscribed to channel Z, then the exchange would route and storethe content published on channel Z to the session queues of each suchsubscribing client in a similar manner.

An embodiment further operates to ensure that server I0 is the sole orthe leader server publishing on channel Z to avoid the duplicativeefforts problem described earlier. When more than one servers appear tobe publishing to the same channel, another embodiment operates to selecta leader server from the multiple publishing servers to avoid theduplicative efforts problem.

A method of an embodiment described herein, when implemented to executeon a device or data processing system, comprises substantial advancementof the functionality of that device or data processing system inmanaging data requests and responses. For example, in order to manageclient-server communications, the prior-art allows the possibility ofduplicative and wasteful efforts on the server-side. In contrast, anembodiment configures and operates a publish-subscribe client-serverarchitecture where the load-sharing servers can avoid duplicativeefforts on the server-side and avoid simultaneous publication ofduplicate content to clients, all while remaining stateless relative toone another. Such manner of data request management in publish-subscribeenvironments is unavailable in presently available devices or dataprocessing systems. Thus, a substantial advancement of such devices ordata processing systems by executing a method of an embodiment allowsfor a scalable stateless backend environment, which significantlyreduces wasteful duplicative server resource consumption for publishingdata and data updates to clients.

The illustrative embodiments are described with respect to certainarchitectures, middleware, protocols, messages, identifiers, networks,parameters, timeouts, conditions, devices, data processing systems,environments, components, and applications only as examples. Anyspecific manifestations of these and other similar artifacts are notintended to be limiting to the invention. Any suitable manifestation ofthese and other similar artifacts can be selected within the scope ofthe illustrative embodiments.

Furthermore, the illustrative embodiments may be implemented withrespect to any type of data, data source, or access to a data sourceover a data network. Any type of data storage device may provide thedata to an embodiment of the invention, either locally at a dataprocessing system or over a data network, within the scope of theinvention. Where an embodiment is described using a mobile device, anytype of data storage device suitable for use with the mobile device mayprovide the data to such embodiment, either locally at the mobile deviceor over a data network, within the scope of the illustrativeembodiments.

The illustrative embodiments are described using specific code, designs,architectures, protocols, layouts, schematics, and tools only asexamples and are not limiting to the illustrative embodiments.Furthermore, the illustrative embodiments are described in someinstances using particular software, tools, and data processingenvironments only as an example for the clarity of the description. Theillustrative embodiments may be used in conjunction with othercomparable or similarly purposed structures, systems, applications, orarchitectures. For example, other comparable mobile devices, structures,systems, applications, or architectures thereof, may be used inconjunction with such embodiment of the invention within the scope ofthe invention. An illustrative embodiment may be implemented inhardware, software, or a combination thereof.

The examples in this disclosure are used only for the clarity of thedescription and are not limiting to the illustrative embodiments.Additional data, operations, actions, tasks, activities, andmanipulations will be conceivable from this disclosure and the same arecontemplated within the scope of the illustrative embodiments.

Any advantages listed herein are only examples and are not intended tobe limiting to the illustrative embodiments. Additional or differentadvantages may be realized by specific illustrative embodiments.

Furthermore, a particular illustrative embodiment may have some, all, ornone of the advantages listed above.

With reference to the figures and in particular with reference to FIGS.1 and 2, these figures are example diagrams of data processingenvironments in which illustrative embodiments may be implemented. FIGS.1 and 2 are only examples and are not intended to assert or imply anylimitation with regard to the environments in which differentembodiments may be implemented. A particular implementation may makemany modifications to the depicted environments based on the followingdescription.

FIG. 1 depicts a block diagram of a network of data processing systemsin which illustrative embodiments may be implemented. Data processingenvironment 100 is a network of computers in which the illustrativeembodiments may be implemented. Data processing environment 100 includesnetwork 102. Network 102 is the medium used to provide communicationslinks between various devices and computers connected together withindata processing environment 100. Network 102 may include connections,such as wired, wireless communication links, or fiber optic cables.

Clients or servers are only example roles of certain data processingsystems connected to network 102 and are not intended to exclude otherconfigurations or roles for these data processing systems. Server 104and server 106 couple to network 102 along with storage unit 108.Software applications may execute on any computer in data processingenvironment 100. Clients 110, 112, and 114 are also coupled to network102. A data processing system, such as server 104 or 106, or client 110,112, or 114 may contain data and may have software applications orsoftware tools executing thereon.

Only as an example, and without implying any limitation to sucharchitecture, FIG. 1 depicts certain components that are usable in anexample implementation of an embodiment. For example, servers 104 and106, and clients 110, 112, 114, are depicted as servers and clients onlyas example and not to imply a limitation to a client-serverarchitecture. As another example, an embodiment can be distributedacross several data processing systems and a data network as shown,whereas another embodiment can be implemented on a single dataprocessing system within the scope of the illustrative embodiments. Dataprocessing systems 104, 106, 110, 112, and 114 also represent examplenodes in a cluster, partitions, and other configurations suitable forimplementing an embodiment.

Device 132 is an example of a device described herein. For example,device 132 can take the form of a smartphone, a tablet computer, alaptop computer, client 110 in a stationary or a portable form, awearable computing device, or any other suitable device. Any softwareapplication described as executing in another data processing system inFIG. 1 can be configured to execute in device 132 in a similar manner.Any data or information stored or produced in another data processingsystem in FIG. 1 can be configured to be stored or produced in device132 in a similar manner. Backend application 105 in server 104 comprisesany application, including but not limited to a server application or aservice application, which responds to a request from a clientapplication. Device 132 is a non-limiting example of a client, andbrowser 134 in device 132 is a non-limiting example of a clientapplication. Requestor application 115 in client 114 is another exampleof a client application. Requestor application 115 or browser 134 sendsa request to which backend application 105 responds. One or more agentapplications 107 in server 106 receive the request from clientapplication 115 or 134, queue the request according to the type ofservice requested, create session queues, and pass responses to clientapplication 115 or 134 as described elsewhere in this disclosure.Messaging middleware 111 provides the queuing and publish-subscribefunctionality in the manner described in this disclosure. For example,messaging middleware 111 facilitates the creation and operation ofqueues 113. A queue in queues 113 may be a service queue (not shown),another queue in queues 113 may be a session queue (not shown), andanother queue in queues 113 may be a server instance queue (not shown).Messaging middleware 111 also implements an exchange function (notshown), which is usable in the manner described in this disclosure.Within the scope of illustrative embodiments, a server or serverinstance operating in conjunction with an embodiment comprises backendapplication 105. An embodiment can be implemented within or inconjunction with backend application 105, within or in conjunction withmessaging middleware 111, as another application (not shown), or somecombination thereof.

Servers 104 and 106, storage unit 108, and clients 110, 112, and 114 maycouple to network 102 using wired connections, wireless communicationprotocols, or other suitable data connectivity. Clients 110, 112, and114 may be, for example, personal computers or network computers.

In the depicted example, server 104 may provide data, such as bootfiles, operating system images, and applications to clients 110, 112,and 114. Clients 110, 112, and 114 may be clients to server 104 in thisexample. Clients 110, 112, 114, or some combination thereof, may includetheir own data, boot files, operating system images, and applications.Data processing environment 100 may include additional servers, clients,and other devices that are not shown.

In the depicted example, data processing environment 100 may be theInternet. Network 102 may represent a collection of networks andgateways that use the Transmission Control Protocol/Internet Protocol(TCP/IP) and other protocols to communicate with one another. At theheart of the Internet is a backbone of data communication links betweenmajor nodes or host computers, including thousands of commercial,governmental, educational, and other computer systems that route dataand messages. Of course, data processing environment 100 also may beimplemented as a number of different types of networks, such as forexample, an intranet, a local area network (LAN), or a wide area network(WAN). FIG. 1 is intended as an example, and not as an architecturallimitation for the different illustrative embodiments.

Among other uses, data processing environment 100 may be used forimplementing a client-server environment in which the illustrativeembodiments may be implemented. A client-server environment enablessoftware applications and data to be distributed across a network suchthat an application functions by using the interactivity between aclient data processing system and a server data processing system. Dataprocessing environment 100 may also be viewed as employing a serviceoriented architecture where interoperable software componentsdistributed across a network may be packaged together as coherentbusiness applications.

With reference to FIG. 2, this figure depicts a block diagram of a dataprocessing system in which illustrative embodiments may be implemented.Data processing system 200 is an example of a computer, such as server104 or client 110 in FIG. 1, or another type of device in which computerusable program code or instructions implementing the processes may belocated for the illustrative embodiments.

Data processing system 200 is also representative of a data processingsystem or a configuration therein, such as device 132 in FIG. 1 in whichcomputer usable program code or instructions implementing the processesof the illustrative embodiments may be located. Data processing system200 is described as a computer only as an example, without being limitedthereto. Implementations in the form of other devices, such as device132 in FIG. 1, may modify data processing system 200, such as by addinga touch interface, and even eliminate certain depicted components fromdata processing system 200 without departing from the generaldescription of the operations and functions of data processing system200 described herein.

In the depicted example, data processing system 200 employs a hubarchitecture including North Bridge and memory controller hub (NB/MCH)202 and South Bridge and input/output (I/O) controller hub (SB/ICH) 204.Processing unit 206, main memory 208, and graphics processor 210 arecoupled to North Bridge and memory controller hub (NB/MCH) 202.Processing unit 206 may contain one or more processors and may beimplemented using one or more heterogeneous processor systems.Processing unit 206 may be a multi-core processor. Graphics processor210 may be coupled to NB/MCH 202 through an accelerated graphics port(AGP) in certain implementations.

In the depicted example, local area network (LAN) adapter 212 is coupledto South Bridge and I/O controller hub (SB/ICH) 204. Audio adapter 216,keyboard and mouse adapter 220, modem 222, read only memory (ROM) 224,universal serial bus (USB) and other ports 232, and PCI/PCIe devices 234are coupled to South Bridge and I/O controller hub 204 through bus 238.Hard disk drive (HDD) or solid-state drive (SSD) 226 and CD-ROM 230 arecoupled to South Bridge and I/O controller hub 204 through bus 240.PCI/PCIe devices 234 may include, for example, Ethernet adapters, add-incards, and PC cards for notebook computers. PCI uses a card buscontroller, while PCIe does not. ROM 224 may be, for example, a flashbinary input/output system (BIOS). Hard disk drive or solid-state drive226 and CD-ROM 230 may use, for example, an integrated drive electronics(IDE), serial advanced technology attachment (SATA) interface, orvariants such as external-SATA (eSATA) and micro-SATA (mSATA). A superI/O (SIO) device 236 may be coupled to South Bridge and I/O controllerhub (SB/ICH) 204 through bus 238.

Memories, such as main memory 208, ROM 224, or flash memory (not shown),are some examples of computer usable storage devices. Hard disk drive orsolid state drive 226, CD-ROM 230, and other similarly usable devicesare some examples of computer usable storage devices including acomputer usable storage medium.

An operating system runs on processing unit 206. The operating systemcoordinates and provides control of various components within dataprocessing system 200 in FIG. 2. The operating system may be acommercially available operating system such as AIX® (AIX is a trademarkof International Business Machines Corporation in the United States andother countries), Microsoft® Windows® (Microsoft and Windows aretrademarks of Microsoft Corporation in the United States and othercountries), Linux® (Linux is a trademark of Linus Torvalds in the UnitedStates and other countries), iOS™ (iOS is a trademark of Cisco Systems,Inc. licensed to Apple Inc. in the United States and in othercountries), or Android™ (Android is a trademark of Google Inc., in theUnited States and in other countries). An object oriented programmingsystem, such as the Java™ programming system, may run in conjunctionwith the operating system and provide calls to the operating system fromJava™ programs or applications executing on data processing system 200(Java and all Java-based trademarks and logos are trademarks orregistered trademarks of Oracle Corporation and/or its affiliates).

Instructions for the operating system, the object-oriented programmingsystem, and applications or programs, such as agents 107, backendapplication 105, or messaging middleware 111 in FIG. 1 are located onstorage devices, such as hard disk drive 226 or a solid-state datastorage device, and may be loaded into at least one of one or morememories, such as main memory 208, for execution by processing unit 206.The processes of the illustrative embodiments may be performed byprocessing unit 206 using computer implemented instructions, which maybe located in a memory, such as, for example, main memory 208, read onlymemory 224, or in one or more peripheral devices.

The hardware in FIGS. 1-2 may vary depending on the implementation.Other internal hardware or peripheral devices, such as flash memory,equivalent non-volatile memory, or optical disk drives and the like, maybe used in addition to or in place of the hardware depicted in FIGS.1-2. In addition, the processes of the illustrative embodiments may beapplied to a multiprocessor data processing system.

In some illustrative examples, data processing system 200 may be amobile computing device, which is generally configured with flash memoryto provide non-volatile memory for storing operating system files and/oruser-generated data. A bus system may comprise one or more buses, suchas a system bus, an I/O bus, and a PCI bus. Of course, the bus systemmay be implemented using any type of communications fabric orarchitecture that provides for a transfer of data between differentcomponents or devices attached to the fabric or architecture.

A communications unit may include one or more devices used to transmitand receive data, such as a modem or a network adapter. A memory may be,for example, main memory 208 or a cache, such as the cache found inNorth Bridge and memory controller hub 202. A processing unit mayinclude one or more processors or CPUs.

The depicted examples in FIGS. 1-2 and above-described examples are notmeant to imply architectural limitations. For example, data processingsystem 200 also may be a tablet computer, laptop computer, or telephonedevice in addition to taking the form of a mobile or wearable device.

With reference to FIG. 3, this figure depicts a block diagram of anexample configuration for ongoing publishing of content in apublish-subscribe client-server environment in accordance with anillustrative embodiment. The dashed line dividing client-side 302 andserver-side 304 represents a data network, such as network 102 inFIG. 1. Client-side 302 represents data requestors, such as clientapplication 306 (client application is also interchangeably referred toherein as “client”). Client application 306 is an example of browser 134or requestor application 115 in FIG. 1.

Server-side 304 represents the server-side data processing environmentwhere backend applications and servers that respond to queries in clientrequests, and other server-side architecture components to support theirfunctions operate. A set of several agents 308 is depicted as anexample. An instance of agent 308 is an example of agent 107 in FIG. 1.Optionally, a load balancer (not shown) or another suitable distributionmethod can be employed to distribute the inbound requests fromclient-side 302 amongst several agents 308.

Messaging middleware 312 is an example of messaging middleware 111 inFIG. 1. Servers 314 comprise a set of servers, server applications, orbackend applications that provide a particular service requested in someclient requests. As a non-limiting example, server 314 may operate asredundant or load-sharing servers to provide a database service toprocess a particular type of query associated with channel Z. Other setsof servers (not shown) may similarly be configured on server-side 304 toprovide other services associated with other queries and requests in asimilar manner.

Service queue 316 holds those client requests that request the serviceprovided by a server instance in servers 314. For example, clientapplication 306 and other client applications (not shown) may send asubscription request for certain data from a database. An agent fromagents 308 receives one such request, identifies the requested service,determines that service queue 316 is associated with the requestedservice, and posts the request in service queue 316. Servers 314subscribe to service queue 316. A server from servers 314 detects theposting of the subscription request to service queue 316, and removesthat request from service queue 316 for processing.

Note that each of servers 314 operates in a stateless manner. In otherwords, a server in servers 314 does not maintain any session or stateinformation to have any particular affinity with any particular clientapplication, or another server. A server in servers 314 simply receivesa subscription request from service queue 316 and processes the request.The received request can be from any client application executing in anyclient data processing system.

In operation, client application 306 begins by sending subscriptionrequest 320 to server-side 304. Subscription request 320 requests aquery that corresponds to a channel, e.g., channel Z. Agent 308 queuesrequest 320 into service queue 316. Server instance I0 from servers 314receives request 320.

In message 318, server I0 publishes content on exchange 324 with channelZ and also binds session queue 326 of client 306 to exchange 324 as aconsumer of channel Z. As an example, server I0 publishes message 318 onexchange 324 by using a routing key with message 318, where the routingkey is set to the channel identifier, which in the example here is Z.

Suppose that session queue 326 is associated with client 306. Exchange324 binds session queue 326 to channel Z. Exchange 324 can bind sessionqueue 326 to any number of different channels for client 306 in asimilar manner. Similarly, exchange 324 can bind any number of sessionqueues that are associated with any number of different clients tochannel Z and/or any number of different channels in a similar manner.

Assuming for the purposes of FIG. 3 that server I0 is the only publisheron channel Z, server I0 publishes or continues publishing content tochannel Z. Exchange 324 routes the published content of channel Z tosession queue 326, which an agent in agent 308 delivers to client 306 aspublished content 322.

With reference to FIG. 4, this figure depicts a block diagram of acondition in channel ownership in a publish-subscribe system inaccordance with an illustrative embodiment. Depicted artifacts withreference numerals reused from FIG. 3 are the same artifacts asdescribed with respect to FIG. 3.

As described with respect to FIG. 3, at one point in time, server I0 hasbecome a publisher on channel Z and client 306 is subscribed to channelZ via session queue 326. Now, suppose that another client, client 406sends subscription request 420. An agent in agents 308 queues request420 in service queue 316 for one of servers 314 to pick up. Because anyof servers 314 can potentially pick up and process the requests fromservice queue 316, assume that server instance I1 receives and removesrequest 420 from service queue 316.

To illustrate a possible channel ownership problem in apublish-subscribe system, assume that request 420 also relates to thesame query as in request 320 from client 306 in FIG. 3. Therefore,request 420 also corresponds to channel Z. Because servers 314 arestateless, server I1 does not have the information to know that serverI0 is already a publisher of channel Z due to message 320. Therefore, inmessage 418, server I1 publishes content on exchange 324 for channel Zand also binds session queue 426 of client 406 to exchange 324 forchannel Z. As an example, server I1 publishes message 418 on exchange324 by using a routing key with the message 418, where the routing keyis set to the channel identifier, which in the example here is Z.Accordingly, exchange 324 binds session queue 426 to channel Z.

Now, session queues 326 and 426 are bound to channel Z. Because serverI0 had previously become the publisher of channel Z due to clientmessage 320, server I0 continues to publish to channel Z and thesubscribers of channel Z receive server I0's publications to channel Z.Because server I1 had become the publisher of channel Z due to clientmessage 320, server I1 continues to publish to channel Z and thesubscribers of channel Z receive server I1's publications to channel Zas well.

As can be seen, unbeknownst to servers I0 or I1, both servers areexpending resources for computing the query of channel Z and publishingthe same resulting content to channel Z. The subscribers of channel Zare therefore receiving duplicate content—one published by server I0 andanother published by server I1.

With reference to FIG. 5, this figure depicts a block diagram of aconfiguration to resolve a channel ownership problem in apublish-subscribe system in accordance with an illustrative embodiment.Depicted artifacts with reference numerals reused from FIGS. 3 and 4 arethe same artifacts as described with respect to FIG. 3.

According to an embodiment, each of servers 314 has a correspondingserver instance queue in server instance queues 502. For example, serverinstance queue 504 corresponds to server I0.

Exchange 524 operates in the manner of exchange 324 and further asdescribed with respect to FIG. 5. When server I0 becomes publisher ofchannel Z, server I0 also binds (506) server instance queue 504 withexchange 524 to receive messages having publisher (Z) as a key.Publisher(Z) is simply a stand-in for a known server-side functionapplied to channel identifier Z, e.g., to result in an identifier Z′. Z′corresponds to channel Z through some function “publisher”. Essentially,when server I0 sends a message to exchange 524 with a routing key of Z,exchange 524 routes those messages to any subscribing client sessionqueues that are bound to exchange 524 with binding key Z. When server I0sends a message to exchange 524 with a routing key of Z′, exchange 524routes those messages to any subscribing server instance queues that arebound to exchange 524 with a binding key Z′. Publisher(Z) is alsoreferred to herein as “publisher of channel identifier Z” or Z′ whenused in a routing context from any of servers 314 to exchange 524.

Now, as a result of binding 506, exchange 524 has at least one serverinstance queue in queues 502 that is subscribed to messages havingpublisher of channel identifier Z, to wit, Z′, as a key and wherecertain mandatory delivery messages having Z′ as a key, as describedherein, can be delivered. A mandatory delivery message is a message thatmust be delivered to at least one recipient or subscriber queue of thechannel, or else must be returned to the sender by messaging middleware.

One type of mandatory delivery message is an “intent to becomepublisher” message (also referred to herein as a “publisher message”)with Z′ as the routing key, which a server instance in servers 314 cansend to exchange. If any server instance queue is subscribed toreceiving messages that have Z′ as the routing key, the publishermessage is delivered to that other server instance queue, otherwise thepublisher message is returned to the sender server instance.

For example, when server I0 determines that server I0 should become thepublisher of channel Z, server I0 sends a intent to become publishermessage with routing key as Z′, the exchange delivers the message to anyother server instance queues that have subscribed to receive messagesthat have Z′ as the routing key. If no such other server instance queueis bound to the exchange with binding key Z′, the exchange returns theintent to become publisher message back to server I0.

If the intent to become publisher message is delivered to somesubscriber queue, the delivery operates as an indication to server I0that there is another server that is a publisher of channel Z. Server I0then yields to the existing publisher server.

If the intent to become publisher message is not delivered to anysubscriber queue, exchange 524 returns the publisher message to serverI0. The failed delivery operates as an indication to server I0 thatthere is no another server that is a publisher of channel Z. Server I0then binds, using binding key Z′, server I0's server instance queue 504to exchange 524 as publisher of channel Z and also updates an internalindicator in server I0 to indicate that server I0 is the publisher forchannel Z.

The intent to become publisher message seeks to resolve a conflictbetween an existing publisher server of a channel and another serverthat is trying to become a publisher server of the same channel. In somecases, however, a race condition situation may arise when there is noexisting publisher server but two or more servers simultaneously ornearly simultaneously try to become the publishers of the same channel.Such simultaneous or near simultaneous conflict is not effectivelyresolved with just intent to become publisher messages.

Another type of mandatory delivery message is a kill message with apublisher of channel identifier, e.g., Z′, as the routing key, which aserver instance in servers 314 can send to exchange. The kill messagealso includes some information of the sender server such that the senderserver's priority relative to a receiver server's priority can beestablished. If any server instance queue is subscribed to receivingmessages that have that publisher of channel identifier, e.g., Z′, asthe routing key, the kill message is delivered to that other serverinstance queue, otherwise the kill message is returned to the senderserver instance. For example, if server I0 sends a kill message with Z′as the routing key, the exchange delivers the message to any serverinstance queues that have subscribed to receive messages that have Z′ asthe routing key. If no such other server instance queue is bound to theexchange for Z′ key, the exchange returns the kill message to server I0.

Within the scope of the illustrative embodiments, any suitableinformation of a server, which is usable to establish the relativepriorities of two servers, can be used in a kill message. For example,and without implying any limitation thereto, one such information can bethe identifiers of the servers. Different servers have differentidentifiers, and some ordering of the server identifiers can be used todetermine that server 1 has a higher priority than server 2, e.g.,because 1 is a lower number than 2, or vice versa. Similarly, differentservers can have different priorities, age, location in a dataprocessing environment, available capacity, utilization, and many othertypes of information that can be compared between two servers todetermine which server has a higher priority at a given time. Anyinformation specific to a server and usable to establish the server'spriority relative to another server is usable within the scope of theillustrative embodiments.

Once a server becomes a publisher of a channel, there exists apossibility that another server also simultaneously became a publisherof the same channel as described above. To avoid such simultaneousconflict, the publisher server sends a kill message.

Assume that server I0 and server I1 both try to become publishers ofchannel Z simultaneously or near simultaneously. Server I0 and I1 hadboth sent intent to become publisher messages to the exchange nearsimultaneously. These messages were returned back to the correspondingservers indicating that there is no existing publisher of the channel.Both server I0 and I1 had then updated their internal state to indicatethemselves as the publisher of the channel. But before assuming the roleof publisher and starting the actual task of publishing on the channel,server I0 and server I1 send kill messages to avoid race conditionproblem. Server I0 sends a kill message K0 with Z′ as routing key and,for example, server I0's identifier 0. Server I1 receives kill messageK0. Similarly, server I1 sends a kill message K1 with Z′ as routing keyand, for example, server I1's identifier 1. Server I0 receives killmessage K1.

Using K0, server I1 compares server I1's own identifier “1” with theidentifier of sender of K0—“0”. Assuming that in the identifier orderingscheme used in the data processing environment, the lower the number thehigher is the priority, server I1 concludes that server I0 has priorityover server I1. Accordingly, server I1 unbinds its server instance queuefrom exchange 524 for Z′ and updates its internal state to stop being apublisher of channel Z. Similarly, using K1, server I0 compares serverI0's own identifier “0” with the identifier of sender of K1—“1”. ServerI0 concludes that server I0 has priority over server I1. Accordingly,server I0 keeps its server instance queue 504 bound to exchange 524 withbinding key Z′ and maintains its internal state as publisher of channelZ.

Both server I0 and server I1 check their internal state after aconfigured amount of time. The internal state of server I0 shows that itis still the publisher for channel Z while the internal state of serverI1 shows that it is no more the publisher of channel Z. Consequently,server I0 assumes the publisher role for channel Z and starts publishingwhile server I1 does not. Thus, even a simultaneous publisher conflictis resolved.

With reference to FIG. 6, this figure depicts a flowchart of an exampleprocess for channel ownership in a publish-subscribe system inaccordance with an illustrative embodiment. Process 600 can beimplemented in a server, such as server I0 in FIG. 3, 4, or 5, where theserver is either modified to perform an operation described herein orthe server operates in conjunction with an application that implementsan operation described herein.

The server, e.g., server instance I0, receives a subscription requestfrom a client (block 602). The server determines that the request is tosubscribe to a channel, e.g., channel Z (block 604). The server bindsthe session queue of the client to the exchange using Z as the bindingkey (block 606).

For all other server instance queues, the server publishes on theexchange, for mandatory delivery, an intent to publish message usingpublisher(Z), to wit, Z′, as the routing key (block 608). The serverdetermines whether the intent to publish message was delivered to anyserver instance queues, or alternatively, whether the intent to publishmessage has not been returned as undelivered (block 610). If the intentto publish message was not delivered, i.e., returned, (“Yes” path ofblock 610), the server ends process 600 thereafter.

If the intent to publish message was not delivered, i.e., returned,(“No” path of block 610), the server binds its server instance queue tothe exchange as a with key Z′ (block 612). The server saves information,such as an internal state information about itself, indicating thatserver I0 is the publisher of channel Z (block 614). The server endsprocess 600 thereafter, or proceeds to process 700 in FIG. 7.

With reference to FIG. 7, this figure depicts a flowchart of an exampleprocess to resolve simultaneous or near simultaneous multiple publisherrace condition in accordance with an illustrative embodiment. Process700 can be implemented in a server, such as server I0 in FIG. 3, 4, or5, where the server is either modified to perform an operation describedherein or the server operates in conjunction with an application thatimplements an operation described herein.

The server, e.g., server instance I0, publishes on the exchange for anyother subscriber server instance queues, a kill message containing thepublisher's priority information with the routing key as publisher(Z),e.g., Z′ (block 702). The server receives and processes any killmessages from any other server that is a publisher of channel Z (block704). After a period of time passes, such as a period within which theserver should have received all kill messages that could come, and theserver has established its own relative priority amongst all senders ofkill messages, the server determines whether the server still remainsthe publisher of channel Z, (block 706).

If the server is still the publisher for channel Z, i.e., server I0 hasthe highest relative priority amongst all concurrent publishers ofchannel Z, (“Yes” path of block 706), the server starts publishing tochannel Z (block 708). The server ends process 700 thereafter.

If the server is not longer the publisher for channel Z, i.e., server I0does not have the highest relative priority amongst all concurrentpublishers of channel Z, (“No” path of block 706), the server updatesinformation about server's own state to indicate that the server is notthe publisher of channel Z (block 710). The server ends process 700thereafter.

With reference to FIG. 8, this figure depicts a flowchart of an exampleprocess to eliminate duplicate publisher in accordance with anillustrative embodiment. Process 800 can be implemented in a server,such as server I0 in FIG. 3, 4, or 5, where the server is eithermodified to perform an operation described herein or the server operatesin conjunction with an application that implements an operationdescribed herein.

The server, e.g., server instance I0, which is a publisher of an examplechannel Z, receives a kill message from another server that is also apublisher of the same channel, e.g., server I1 (block 802). The serverresolves in a manner described earlier, which of server I0 and server I1has superiority or priority relative to one another (block 804).

If the server determines that I0 has the priority (“I0” path of block806), the server sets an internal state to indicate that server I0 isthe publisher of channel Z (block 808). The server publishes on theexchange for any other subscriber server instance queues, a kill messagecontaining the publisher's priority information with the publisher(Z) asrouting key, e.g., Z′ (block 810). The server ends process 800thereafter. The kill message is processed in the manner of process 700in FIG. 7.

If the server determines that I1 has the priority (“I1” path of block806), the server unbinds the server's server instance queue from theexchange as a publisher of channel Z (block 812). The server updates aninternal state to indicate that server I0 is not the publisher ofchannel Z (block 814). The server ends process 800 thereafter.

The illustrative embodiments have been described using certain examplesmessages only for the clarity of the description and not as a limitationon the illustrative embodiments. From this disclosure, those of ordinaryskill in the art will recognize that the illustrative embodimentsdescribed herein are agnostic to the specific transport protocol used tocommunicate requests and responses between clients and servers, and canbe adapted to operate with HTTP or other protocols, and the same iscontemplated within the scope of the illustrative embodiments.

Thus, a computer implemented method, system or apparatus, and computerprogram product are provided in the illustrative embodiments for channelownership in a publish-subscribe system. Where an embodiment or aportion thereof is described with respect to a type of device, thecomputer implemented method, system or apparatus, the computer programproduct, or a portion thereof, are adapted or configured for use with asuitable and comparable manifestation of that type of device.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

What is claimed is:
 1. A method for managing channel ownership in apublish-subscribe data processing environment, the method comprising:determining, at a first server, using a processor and a memory, that asubscription request from a client relates to a channel, the channelhaving a channel identifier; causing, at an exchange component in amessaging middleware, a session queue associated with the client to bindto the channel; indicating an intent of the first server to become apublisher of the channel by communicating from the first server amandatory delivery message to be routed by the exchange component usinga publisher identifier, the publisher identifier being related to thechannel identifier; configuring a kill message with a priorityinformation corresponding to the first server, wherein the priorityinformation comprises a server instance information usable to establisha priority of the first server relative to a second server for thechannel, wherein the first server and the second server are bothattempting to become publishers of content on the channel;communicating, from the first server to the exchange component, the killmessage to be routed by the exchange component using a publisheridentifier to a set of server instance queues corresponding to a set ofother servers; and beginning, responsive to the first server remainingthe publisher of the channel after a period following the communicatingof the kill message, publishing content from the first server inresponse to the subscription request.
 2. The method of claim 1, furthercomprising: binding, responsive to the mandatory delivery message beingundeliverable to any server instance queues in the messaging middleware,a server instance queue associated with the first server to receive anymessages routed using the publisher identifier by the exchangecomponent; and updating an indicator to indicate that the first serveris the publisher of the channel.
 3. The method of claim 1, furthercomprising: deriving the publisher identifier by using the channelidentifier as a parameter of a function.
 4. The method of claim 1,further comprising: deriving the priority information corresponding tothe first server from the server instance information and the channelidentifier.
 5. The method of claim 1, further comprising: configuring, asecond kill message to be routed using a publisher identifier by theexchange component; communicating, from the first server to the exchangecomponent, a second kill message; and causing, responsive tocommunicating the second kill message, the exchange component to routethe second kill message to a set of server instance queues correspondingto a set of other servers; determining, after a period following thecommunicating of the second kill message, whether the first serverremains the publisher of the channel; and updating, responsive to thefirst server not remaining the publisher of the channel, an indicator toindicate that the first server is not the publisher of the channel. 6.The method of claim 1, further comprising: receiving, at the firstserver from a second server, a second kill message, the second killmessage being routed according to a publisher identifier and includingpriority information corresponding to the second server, and wherein thefirst server and the second server are both attempting to becomepublishers of content on the channel; determining, by comparing thepriority information corresponding to the second server from the secondkill message with a priority information corresponding to the firstserver, whether the first server remains the publisher of the channel;and unbinding from the exchange component, responsive to the secondserver having a higher priority than the first server, not remaining thepublisher of the channel, a server instance queue associated with thefirst server.
 7. The method of claim 1, further comprising: receiving,at the first server from a second server, a second kill message, thesecond kill message being routed according to a publisher identifier andincluding priority information corresponding to the second server, andwherein the first server and the second server are both attempting tobecome publishers of content on the channel; determining, by comparingthe priority information corresponding to the second server from thesecond kill message with a priority information corresponding to thefirst server, whether the first server remains the publisher of thechannel; and updating, responsive to the first server having a higherpriority than the second server, an indicator to indicate that the firstserver is the publisher of the channel.
 8. The method of claim 7,further comprising: configuring, a third kill message to be routed usinga publisher identifier by the exchange component; configuring the thirdkill message with the priority information corresponding to the firstserver; communicating, from the first server to the exchange component,the third kill message; and causing, responsive to communicating thethird kill message, the exchange component to route the third killmessage to a set of server instance queues corresponding to a set ofother servers.
 9. The method of claim 1, further comprising: receivingthe subscription request at the first server; and determining that thesubscription request is of a type, wherein the type corresponds to thechannel.
 10. The method of claim 1, further comprising: receiving thesubscription request at the first server; and hashing a query in therequest to obtain a hash value, wherein the hash value corresponds tothe channel, and wherein the type corresponds to the channel.
 11. Themethod of claim 1, wherein the session queue is uniquely associated withthe client in a messaging middleware, wherein the session queue is boundto the exchange component using the channel identifier as a binding key,wherein the publisher identifier forms a routing key, and wherein theexchange component routes the mandatory delivery message using therouting key.
 12. A computer usable program product comprising a computerreadable storage device including computer usable code for managingchannel ownership in a publish-subscribe data processing environment,the computer usable code comprising: computer usable code fordetermining, at a first server, using a processor and a memory, that asubscription request from a client relates to a channel, the channelhaving a channel identifier; computer usable code for causing, at anexchange component in a messaging middleware, a session queue associatedwith the client to bind to the channel; computer usable code forindicating an intent of the first server to become a publisher of thechannel by communicating from the first server a mandatory deliverymessage to be routed by the exchange component using a publisheridentifier, the publisher identifier being related to the channelidentifier; computer usable code for configuring a kill message with apriority information corresponding to the first server, wherein thepriority information comprises a server instance information usable toestablish a priority of the first server relative to a second server forthe channel, wherein the first server and the second server are bothattempting to become publishers of content on the channel; computerusable code for communicating, from the first server to the exchangecomponent, the kill message to be routed by the exchange component usinga publisher identifier to a set of server instance queues correspondingto a set of other servers; and computer usable code for beginning,responsive to the first server remaining the publisher of the channelafter a period following the communicating of the kill message,publishing content from the first server in response to the subscriptionrequest.
 13. The computer usable program product of claim 12, furthercomprising: computer usable code for binding, responsive to themandatory delivery message being undeliverable to any server instancequeues in the messaging middleware, a server instance queue associatedwith the first server to receive any messages routed using the publisheridentifier by the exchange component; and computer usable code forupdating an indicator to indicate that the first server is the publisherof the channel.
 14. The computer usable program product of claim 12,further comprising: computer usable code for deriving the publisheridentifier by using the channel identifier as a parameter of a function.15. The computer usable program product of claim 12, wherein thecomputer usable code is stored in a computer readable storage device ina server data processing system, and wherein the computer usable code isdownloaded over a network to a remote data processing system for use ina computer readable storage device associated with the remote dataprocessing system.
 16. The computer usable program product of claim 12,further comprising: computer usable code for configuring, a second killmessage to be routed using a publisher identifier by the exchangecomponent; computer usable code for communicating, from the first serverto the exchange component, a second kill message; and computer usablecode for causing, responsive to communicating the second kill message,the exchange component to route the second kill message to a set ofserver instance queues corresponding to a set of other servers; computerusable code for determining, after a period following the communicatingof the second kill message, whether the first server remains thepublisher of the channel; and computer usable code for updating,responsive to the first server not remaining the publisher of thechannel, an indicator to indicate that the first server is not thepublisher of the channel.
 17. The computer usable program product ofclaim 12, further comprising: computer usable code for receiving, at thefirst server from a second server, a second kill message, the secondkill message being routed according to a publisher identifier andincluding priority information corresponding to the second server, andwherein the first server and the second server are both attempting tobecome publishers of content on the channel; computer usable code fordetermining, by comparing the priority information corresponding to thesecond server from the second kill message with a priority informationcorresponding to the first server, whether the first server remains thepublisher of the channel; and computer usable code for unbinding fromthe exchange component, responsive to the second server having a higherpriority than the first server, not remaining the publisher of thechannel, a server instance queue associated with the first server. 18.The computer usable program product of claim 12, further comprising:computer usable code for receiving, at the first server from a secondserver, a second kill message, the second kill message being routedaccording to a publisher identifier and including priority informationcorresponding to the second server, and wherein the first server and thesecond server are both attempting to become publishers of content on thechannel; computer usable code for determining, by comparing the priorityinformation corresponding to the second server from the second killmessage with a priority information corresponding to the first server,whether the first server remains the publisher of the channel; andcomputer usable code for updating, responsive to the first server havinga higher priority than the second server, an indicator to indicate thatthe first server is the publisher of the channel.
 19. The computerusable program product of claim 18, further comprising: computer usablecode for configuring, a third kill message to be routed using apublisher identifier by the exchange component; computer usable code forconfiguring the third kill message with the priority informationcorresponding to the first server; computer usable code forcommunicating, from the first server to the exchange component, thethird kill message; and causing, responsive to communicating the thirdkill message, the exchange component to route the third kill message toa set of server instance queues corresponding to a set of other servers.20. A data processing system for managing channel ownership in apublish-subscribe data processing environment, the data processingsystem comprising: a storage device, wherein the storage device storescomputer usable program code; and a processor, wherein the processorexecutes the computer usable program code, and wherein the computerusable program code comprises: computer usable code for determining, ata first server, using a processor and a memory, that a subscriptionrequest from a client relates to a channel, the channel having a channelidentifier; computer usable code for causing, at an exchange componentin a messaging middleware, a session queue associated with the client tobind to the channel; computer usable code for indicating an intent ofthe first server to become a publisher of the channel by communicatingfrom the first server a mandatory delivery message to be routed by theexchange component using a publisher identifier, the publisheridentifier being related to the channel identifier; computer usable codefor configuring a kill message with a priority information correspondingto the first server, wherein the priority information comprises a serverinstance information usable to establish a priority of the first serverrelative to a second server for the channel, wherein the first serverand the second server are both attempting to become publishers ofcontent on the channel; computer usable code for communicating, from thefirst server to the exchange component, the kill message to be routed bythe exchange component using a publisher identifier to a set of serverinstance queues corresponding to a set of other servers; and computerusable code for beginning, responsive to the first server remaining thepublisher of the channel after a period following the communicating ofthe kill message, publishing content from the first server in responseto the subscription request.